package com.ictravi.iamunit.connector;

import java.util.Collection;
import java.util.Map;
import com.ictravi.iamunit.IAMUnitException;

/**
 * Basic connector interface on which the connector system is based.
 * 
 * @author Albert Louw (alouw@ictavi.com)
 * @version v1.0.0
 */
public interface Connector {
	/**
	 * Called on startup of the connector
	 * @param config
	 * 			Initializes a connector with this config 
	 * @since v1.0.0
	 */
	public void setup(Map<String, String> config) throws IAMUnitException;

	/**
	 * Called when the connector is closed
	 * @since v1.0.0
	 */
	public void tearDown() throws IAMUnitException;

	/**
	 * Called to execute a line from the sheet
	 * @param data
	 * 			The operational datamap to test with
	 * @since v1.0.0
	 */
	public void execute(String operation, Map<String, Collection<String>> data)
			throws IAMUnitException;
}
